package com.cvmars.jianyou.config;

import com.cvmars.jianyou.api.api.Api;
import com.cvmars.jianyou.api.api.HttpUtils;
import com.cvmars.jianyou.api.api.SimpleSubscriber;
import com.cvmars.jianyou.api.model.HttpResult;
import com.cvmars.jianyou.model.UserInfoManager;
import com.cvmars.jianyou.model.UserListModel;
import com.orhanobut.hawk.Hawk;

/**
 * Created by hehaifeng on 2018/8/9.
 */

public class UserOp {


    public static void onFollowing(String coustomer_id, String status, final OnCallBack callBack) {

        HttpUtils.getInstance().toSubscribe(Api.getInstance().postUserFollow(coustomer_id, status)
                , new SimpleSubscriber<HttpResult<UserListModel>>() {
                    @Override
                    protected void _onNext(HttpResult<UserListModel> o) {

                        if(callBack!=null){
                            callBack.callBack();
                        }
                    }

                    @Override
                    protected void _onError(String message) {

                    }
                });
    }


    public interface OnCallBack {

        void callBack();
    }

}
